
<%@page import="com.tt.DAO.CategoryDAO"%>
<%@page import="com.tt.DAO.UserManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.sql.*, com.tt.shpping.*, java.util.*" %>
<%
List<Category> categories = CategoryDAO.getCategories();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="javascript" src="TV20.js"></script>
<title>Insert title here</title>
</head>
<body>
	
	<script language="javascript">
	
		addNode(-1,0,"all","../images/1.jpg");
		<%
		for(Iterator<Category> it = categories.iterator();it.hasNext();){
			Category c = it.next();
			out.print(c.getPid());
		%>
			addNode(<%=c.getPid()%>,<%=c.getId()%>,"<%=c.getName()%>","../images/1.jpg");
		<%
		}
		%>
		showTV();
		
	</script>

</table>

</body>
</html>